home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // Clock.h
- //
- //***********************************************************************
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CMainWindow : public CFrameWnd
- {
- private:
- BOOL m_bFullWindow;
- BOOL m_bStayOnTop;
-
- int m_nPrevSecond;
- int m_nPrevMinute;
- int m_nPrevHour;
-
- void DrawClockFace (CDC*);
- void DrawSecondHand (CDC*, int, int, int, COLORREF);
- void DrawHand (CDC*, int, int, int, COLORREF);
-
- void SetTitleBarState ();
- void SetTopMostState ();
- void SaveWindowState ();
- void UpdateSystemMenu (CMenu*);
-
- public:
- CMainWindow ();
- virtual BOOL PreCreateWindow (CREATESTRUCT&);
- BOOL RestoreWindowState ();
-
- protected:
- afx_msg int OnCreate (LPCREATESTRUCT);
- afx_msg void OnGetMinMaxInfo (MINMAXINFO*);
- afx_msg void OnTimer (UINT);
- afx_msg void OnPaint ();
- afx_msg UINT OnNcHitTest (CPoint);
- afx_msg void OnSysCommand (UINT, LPARAM);
- afx_msg void OnContextMenu (CWnd*, CPoint);
- afx_msg void OnEndSession (BOOL);
- afx_msg void OnClose ();
-
- DECLARE_MESSAGE_MAP ()
- };
-
- class CAboutDialog : public CDialog
- {
- private:
- CRect m_rect;
-
- public:
- CAboutDialog (CWnd* pParentWnd) :
- CDialog (IDD_ABOUTDLG, pParentWnd) {}
-
- virtual BOOL OnInitDialog ();
-
- protected:
- afx_msg void OnPaint ();
- DECLARE_MESSAGE_MAP ()
- };
-